import type { AddressItem, GetPatientOrderLogisticsData, PatientMedicineOrderPreData } from "@/types/order"
import { request } from "@/utils/request"

//订单-查询收货地址列表
export const getPatientOrderAddressAPI=()=>{
  return request<AddressItem[]>('/patient/order/address')
}

//取消订单
export const DeletePatientOrderAPI=(id:string)=>{
  return request<{ [key: string]: any }>(`/patient/order/cancel/${id}`, 'DELETE')
}

/**
 * 查询物流信息
 * @param id 订单ID
 * @returns
 */
export const getPatientOrderLogisticsByIdAPI = (id: string) => {
  return request<GetPatientOrderLogisticsData>(`/patient/order/${id}/logistics`, 'GET')
}